package cn.iocoder.yudao.module.erp.controller.admin.finance.financein.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Schema(description = "管理后台 - 收入单 Response VO")
@Data
@ExcelIgnoreUnannotated
public class FinanceInRespVO {

    @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "5729")
    @ExcelProperty("id")
    private Long id;

    @Schema(description = "订单号", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("订单号")
    private String billNo;

    @Schema(description = "上游销售订单id", example = "23114")
    @ExcelProperty("上游销售订单id")
    private Long linkId;

    @Schema(description = "上游销售订单号")
    @ExcelProperty("上游销售订单号")
    private String linkNo;

    @Schema(description = "收款日期")
    @ExcelProperty("收款日期")
    private LocalDateTime billDate;

    @Schema(description = "收款金额", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("收款金额")
    private BigDecimal amount;

    @Schema(description = "付款方")
    @ExcelProperty("付款方")
    private String payer;

    @Schema(description = "收入类型id", requiredMode = Schema.RequiredMode.REQUIRED, example = "14113")
    @ExcelProperty("收入类型id")
    private Long incomeId;

    @Schema(description = "收入类型名称", example = "全款")
    private String incomeName;

    @Schema(description = "账户id", example = "19617")
    @ExcelProperty("账户id")
    private Long accountId;

    @Schema(description = "账户名称", example = "现金")
    private String accountName;

    @Schema(description = "经办人id", example = "12139")
    @ExcelProperty("经办人id")
    private Long operatorId;

    @Schema(description = "经办人名字", example = "张三")
    @ExcelProperty("经办人名字")
    private String operatorName;

    @Schema(description = "项目id", example = "16265")
    @ExcelProperty("项目id")
    private Long projectId;

    @Schema(description = "项目名称", example = "张三")
    @ExcelProperty("项目名称")
    private String projectName;

    @Schema(description = "备注", example = "你说的对")
    @ExcelProperty("备注")
    private String remark;

    @Schema(description = "附件")
    @ExcelProperty("附件")
    private String file;

    @Schema(description = "添加时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("添加时间")
    private LocalDateTime createTime;

    @Schema(description ="销售订单")
    @ExcelProperty("销售订单")
    private Item item;

    @Data
    public static class Item {
        @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "5611")
        @ExcelProperty("id")
        private Long id;

        @Schema(description = "订单号", requiredMode = Schema.RequiredMode.REQUIRED)
        @ExcelProperty("订单号")
        private String billNo;

        @Schema(description = "总金额")
        @ExcelProperty("总金额")
        private BigDecimal aggregateAmount;

        @Schema(description = "优惠金额")
        @ExcelProperty("优惠金额")
        private BigDecimal discountAmount;

        @Schema(description = "优惠后总金额")
        @ExcelProperty("优惠后总金额")
        private BigDecimal totalAmount;

        @Schema(description = "备注")
        @ExcelProperty("备注")
        private String remark;

    }
}